package com.itheima.day03.ZuoYe.ZuoYe6;

public class Test {
    public static void feed(Animal1 a){
        a.eat();
    }
    public static void main(String[] args) {

        feed(new Animal1() {
            @Override
            public void eat() {
                System.out.println("吃猫罐头");
            }
        });
        feed(new Animal1() {
            @Override
            public void eat() {
                System.out.println("吃骨头");
            }
        });
        feed(new Animal1() {
            @Override
            public void eat() {
                System.out.println("吃粑粑");
            }
        });
    }
}
